#include "widget.h"

#include <QApplication>
//输入框美化
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    //设置边框宽度
    QString style="QLineEdit { border-width:2px; }";
    //设置边框颜色
    style+="QLineEdit { border-color:rgb(170,170,255); }";
    //设置边框风格-粗细
    style+="QLineEdit { border-style:solid; }";
    //设置边框圆角
    style+="QLineEdit { border-radius:20px; }";
    //设置内测左边距
    style+="QLineEdit { padding-left:10px; }";
    //设置文本内容颜色
    style+="QLineEdit { color:rgb(170,85,127); }";
    //设置字体大小
    style+="QLineEdit { font-size:24px; }";
    //设置背景颜色
    style+="QLineEdit { background-color:rgb(220,220,220); }";
    //设置选中时的文字颜色
    style+="QLineEdit { selection-color:rgb(0,180,0); }";
    //设置选中时的背景颜色
    style+="QLineEdit { selection-background-color:rgb(180,0,0); }";
    //将QSS样式设置为全局
    a.setStyleSheet(style);
    Widget w;
    w.show();
    return a.exec();
}
